<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script>


        function maxScoreWords() {
           /* str=["flower","flow","flight"]
            //生成一个新数组
            var st=new Array()
            //接收比较的数组
            var sd=""
            //将第一个数字复制给第一个数
            st=str[0]
            for (let i=1;i<st.length-1;i++){
                sd=st[i]
               /!* alert(sd.length)*!/
                for (let j=0;j<sd.length-1;j++){
                    if (str[j]!==sd[j]){
                        //截取st后面不相等的字符
                        st.splice(j,st.length-1)
                        console.log(st)
                        break
                    }
                }
            }
            
            alert(st)*/
        /*    nums=[1,0]
            var sum=1
            var count=0
            //输出数组
            var inputarr=new  Array()
            for (let i=0;i<nums.length;i++){
                if(nums[i]==0){
                    count++
                }
                sum=sum*nums[i]
            }
            //输出数组
            for (let j=0;j<nums.length;j++){
                if (count==1&&nums[j]==0){
                    //计算所有乘积
                    var all=1
                    for (let k=0;k<nums.length;k++){
                        if(k==j){
                            k++
                        }else{
                            all=all*nums[k]
                        }

                    }
                    inputarr.push(all)
                }
                if (count>1){
                    inputarr.push(0)
                }else {
                    inputarr.push(sum/nums[j])
                }

            }
        alert(inputarr)
*/

        //如果剩下的石头为1 2 3块时己方获胜
        var num1 = "123456789", num2 = "987654321"
         nums1=Number(num1)
         nums2=Number(num2)
            var sum=num1*num2
            console.log(sum)

        }



        //构造链表


    </script>
    <script src="腾讯精选练习50题/5-最长回文字串.js"></script>
</head>

<body>
    <div>
        <input type="button" onclick="maxScoreWords()" />
        <p onload="shortestSubarray()">12</p>
    </div>


</body>

</html>